package com.gin.custom.cust1;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.gin.custom.R;

/**
 * Created by db.boy on 2018/6/11.
 */
public class CustFilter3View extends LinearLayout {
    private TextView txt;

    public CustFilter3View(Context context) {
        this(context, null);
    }

    public CustFilter3View(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CustFilter3View(final Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        LayoutInflater.from(context).inflate(R.layout.pop_cust3, this);
        txt = findViewById(R.id.txt);
        View view  = findViewById(R.id.btn);
        view.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(context,"v点击",Toast.LENGTH_SHORT).show();
            }
        });
    }
    public void setText(CharSequence sequence){
        txt.setText(sequence);
    }
}
